using Microsoft.Cci;
using Microsoft.FxCop.Sdk;
using Microsoft.FxCop.Sdk.Introspection;
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Windows.Forms;

namespace Tyng.Rules.Windows.Forms
{
    internal sealed class ProperlyDeclareOtherControls : ProperlyDeclareControls<ProperlyDeclareOtherControls>
    {
        public ProperlyDeclareOtherControls() : base(new Type[] { typeof(Control) }, GetIgnoreTypes()) { }

        private static Type[] GetIgnoreTypes()
        {
            List<Type> l = new List<Type>(ProperlyDeclareLabels.LabelTypes.Length + ProperlyDeclareContainerControls.ContainerTypes.Length);

            l.AddRange(ProperlyDeclareContainerControls.ContainerTypes);
            l.AddRange(ProperlyDeclareLabels.LabelTypes);

            return l.ToArray();
        }
    }
}
